-- GENERATED SPELL FOR [Bloodmaul Soothsayer] --


function spell0_22384(pUnit, Event) --@Demon Armor,Self--
pUnit:FullCastSpellOnTarget(13787,pUnit)
pUnit:RegisterEvent('Sorts_22384', 0, 1)
end

function spell1_22384(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20825,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22384', 3000, 1)
end

function spell2_22384(pUnit, Event) --@Summon Imp,Self--
pUnit:FullCastSpellOnTarget(11939,pUnit)
pUnit:RegisterEvent('Sorts_22384', 668, 1)
end

function Sorts_22384(pUnit, Event)
local choix_sorts_22384 = math.random(0, 2)
if choix_sorts_22384 == 0 then
pUnit:RegisterEvent('spell0_22384', 1, 1)
end
if choix_sorts_22384 == 1 then
pUnit:RegisterEvent('spell1_22384', 1, 1)
end
if choix_sorts_22384 == 2 then
pUnit:RegisterEvent('spell2_22384', 1, 1)
end
end

function mob22384_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22384', math.random(1500, 3000), 1)
end

function mob22384_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22384_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22384_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22384, 1, 'mob22384_Action')
RegisterUnitEvent(22384, 2, 'mob22384_Leave')
RegisterUnitEvent(22384, 3, 'mob22384_Kill')
RegisterUnitEvent(22384, 4, 'mob22384_Die')
